# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-jstyleson
#_pkgreal is used by apkbuild-pypi to find modules at PyPI
_pkgreal=jstyleson
pkgver=0.0.2
_gittag=8c47cc9e665b3b1744cccfaa7a650de5f3c575dd
pkgrel=1
pkgdesc="Library to parse JSON with js-style comments."
url="https://pypi.python.org/project/jstyleson"
arch="noarch"
license="MIT"
checkdepends="py3-pytest"
makedepends="py3-setuptools py3-gpep517 py3-wheel"
source="$pkgname-$_gittag.tar.gz::https://codeload.github.com/linjackson78/jstyleson/tar.gz/8c47cc9e665b3b1744cccfaa7a650de5f3c575dd"
builddir="$srcdir/$_pkgreal-$_gittag"
subpackages="$pkgname-pyc"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer "$builddir"/.dist/*.whl
	.testenv/bin/python3 -m pytest -v
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
363ec49b4228308ac02ffa94317e8b4f67a497cb4fce090e69988472a0e1fe85f5a5f1f690cfa7a9b4950eb000d9ddf3ec79a4c475f0db165dd63a95f15e1638  py3-jstyleson-8c47cc9e665b3b1744cccfaa7a650de5f3c575dd.tar.gz
"
